package com.application.race.manage;

import java.util.HashMap;
import java.util.Map;

import com.application.race.manage.action.Actions;
public class MapManager  {
	//Map<String,UserInfo> catchusers;
	Map<Integer,RacingRoom> rooms;
	//Players players;
	static final int MAX_USER_NUMBER=5000;
 
	public Actions actions;
	public MapManager(){
		String url="map001.tmx";
 		MapInfo map=MapFactory.loadMap(url);
		maps.put(url, map);
		String url1="map002.tmx";
		MapInfo map1=MapFactory.loadMap(url1);
		maps.put(url1, map1);
		String url2="map003.tmx";
		MapInfo map2=MapFactory.loadMap(url2);
		maps.put(url2, map2);
	}
	HashMap<String,MapInfo> maps=new HashMap<String,MapInfo>();
    public MapInfo getMap(String url){
    	if(maps.containsKey(url)){
    		return maps.get(url);
    	}else{
    		MapInfo map=MapFactory.loadMap(url);
    		maps.put(url, map);
    		return map;
    	}
    	
    }

}
